package com.th.supcom.pds.impl.manager.impl;

import java.util.List;

import net.carefx.fc.framework.db.manager.GetSequenceHelper;

import org.apache.ibatis.session.RowBounds;

import com.th.supcom.pds.domain.vo.PdsPackageInfoVO;
import com.th.supcom.pds.impl.dao.PdsSupplyPackageMapper;
import com.th.supcom.pds.impl.manager.PdsSupplyPackageManager;

public class PdsSupplyPackageManagerImpl implements PdsSupplyPackageManager
{
    /**
     * 公司版权信息.
     */
    public static final String copyright = "Copyright 2014, Carefx Corporation";
    /**
     * 提交路径.
     */
    public static final String SCC_BRANCH = "$URL$";
    /**
     * 提交日期.
     */
    public static final String SCC_LAST_MODIFICATION_DATE = "$Date$";

    /**
     * 最终修改人员.
     */
    public static final String SCC_LAST_MODIFIER_NAME = "$Author$";

    /**
     * 最终版本号.
     */
    public static final String SCC_REVISION = "$Revision$";

    /** 序列生成器. */
    private GetSequenceHelper m_getSequenceHelper;
    private PdsSupplyPackageMapper m_pdsSupplyPackageMapper;

    @Override
    public void addPdsPackageInfo (final PdsPackageInfoVO list)
    {
        m_pdsSupplyPackageMapper.addPdsPackageInfo (list);

    }

    @Override
    public int findPdsPackageInfoVOCountByName (final String name)
    {

        return m_pdsSupplyPackageMapper.findPdsPackageInfoVOCountByName (name);

    }

    @Override
    public List <PdsPackageInfoVO> findPdsPackageInfoVOWithPageByName (final int offset, final int limit, final String name)
    {
        return m_pdsSupplyPackageMapper.findPdsPackageInfoVOWithPageByName (new RowBounds (offset, limit), name);

    }

    @Override
    public Long getSequence ()
    {

        return m_getSequenceHelper.getNextSequenceId ("PHAM_PACK_UNIT");

    }

    @Override
    public void modifyPdsPackageInfoByExample (final PdsPackageInfoVO pdsPackageInfoVO)
    {

        m_pdsSupplyPackageMapper.modifyPdsPackageInfoByExample (pdsPackageInfoVO);

    }

    @Override
    public void removePdsPackageInfoByList (final List <Long> serialNoList)
    {
        m_pdsSupplyPackageMapper.removePdsPackageInfoByList (serialNoList);

    }

    /**
     * 注入序列.
     * 
     * @param getSequenceHelper getSequenceHelper.
     */
    public void setGetSequenceHelper (final GetSequenceHelper getSequenceHelper)
    {
        m_getSequenceHelper = getSequenceHelper;
    }

    public void setPdsSupplyPackageMapper (final PdsSupplyPackageMapper pdsSupplyPackageMapper)
    {

        m_pdsSupplyPackageMapper = pdsSupplyPackageMapper;
    }
}
